# 基于 Node.js 官方提供的最小化镜像构建自定义镜像
FROM node:latest as build-stage
WORKDIR /app
#COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
 
# 从上面构建好的镜像中复制生成的 dist 目录到 nginx 服务器的默认网站目录
#FROM nginx:stable-alpine
COPY --from=build-stage /app/dist/* /usr/local/server/nginx/html
#EXPOSE 80
#CMD ["nginx", "-g", "daemon off;"]